package com.sumainfor.pc.market.fallback;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sumainfor.common.exception.TCException;
import com.sumainfor.common.util.JsonResult;
import com.sumainfor.common.utlis.Pager;
import com.sumainfor.pc.market.feign.BaseFeignZuul;
import org.springframework.stereotype.Component;

import java.util.*;

/**
 * 功能描述:
 *
 * @Auther: zhlu
 * @Date: 2019/1/18 16:03
 * @Description:
 */
@Component
public class FeignZuulFallback implements BaseFeignZuul {

    @Override
    public JsonResult getAllUserIdAndName() {
        return JsonResult.error("路由服务器繁忙，请稍后重试！");
    }

    @Override
    public List<Map<String, Object>> getDeptList(Map<String, Object> params) {
        return new ArrayList<>();
    }

    @Override
    public Map<String, Object> getDeptByDeptIdMap(Map<String, Object> params) {
        return new HashMap<String,Object>();
    }

    @Override
    public List<Map<String, Object>> getPostDeptList(Map<String, Object> params) {
        return new ArrayList<>();
    }

    @Override
    public JsonResult getUserInfo(Collection<String> ids) {
        return JsonResult.error("路由服务器繁忙，请稍后重试！");
    }

    @Override
    public JsonResult getMobileNumber(String userId) {
        return JsonResult.error("服务器繁忙，请稍后重试！");
    }

    @Override
    public JsonResult getUserMap(Map<String, Object> params) {
        return JsonResult.error("服务器繁忙，请稍后重试！");
    }

    @Override
    public Map<String, Object> getArea(Map<String, Object> params) {
        return new HashMap<>();
    }

    @Override
    public JsonResult AddMessage(Map<String, Object> params) {
        return JsonResult.error("服务器繁忙，请稍后重试！");
    }

    @Override
    public JsonResult getMessageList(Map<String, Object> params, Pager pager) {
        return JsonResult.error("服务器繁忙，请稍后重试！");
    }

    @Override
    public Integer getPeopleCountByDeptId(Integer deptId, String startTime, String endTime) {
        throw new TCException("路由异常");
    }

    @Override
    public Page<Map<String, Object>> selectPeopleData(long size, long current, String miId, String startTime, String endTime) {
        throw new TCException("路由异常");
    }

    @Override
    public List<Map<String, Object>> getCenterServiceIdList(Integer areaId) {
        throw new TCException("路由异常");
    }

    @Override
    public JsonResult getSystemUser(Map<String, Object> params) {
        return JsonResult.error("路由异常");
    }
}
